package biz.obake.team.touchprotector.ui;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.u;
import biz.obake.team.touchprotector.R;

public class b extends Fragment {
    public void a() {
        try {
            String string = getArguments().getString("className");
            u i = getChildFragmentManager().i();
            i.q(getArguments().getInt("fragmentId"), (a) Class.forName("biz.obake.team.touchprotector.ui." + string).newInstance(), string);
            i.h();
        } catch (Exception unused) {
        }
    }

    public b c(String str, int i) {
        Bundle bundle = new Bundle();
        bundle.putString("className", str);
        bundle.putInt("fragmentId", i);
        setArguments(bundle);
        return this;
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(R.layout.ui_tabfragment_wrapper, viewGroup, false);
        inflate.findViewById(R.id.fragment_container).setId(getArguments().getInt("fragmentId"));
        a();
        return inflate;
    }
}
